<script>
import store from '@/common/store'
// #ifdef H5
import { h5Login } from '@/config/h5Utils';
// #endif
import tools from '@/common/utils/tools'
//公众号测试：http://i.yodin.com/index.php/index/Login/offi?bid=3&offiurl=https://i.yodin.com/h5/#/
import { mpUpData,scene } from '@/config/common';
	export default {

		onLaunch(e){
			//取出缓存数据
			//store.commit('setCacheData');
            //获取二维码信息
            scene(e)
            // #ifdef APP-PLUS
            //APPUpdate() //检测app更新
            // #endif

		let getBid = this.$tools.getExtStoreId('bid');
		console.log('getBid',getBid)
		if (getBid>0&&uni.getExtConfigSync&&getBid!=undefined){
			let busdata = {
				bid:getBid
			};
			this.$store.commit("setbasebusinessID",busdata);
			try{
				const extConfig = uni.getExtConfigSync()
				this.$store.commit("set_extConfig",extConfig);
			}catch(err){}
		}


		// #ifdef APP-PLUS
		//APPUpdate();
		// #endif
		
		
		},
		onShow: function(e) {

			// //获取二维码携带的参数
			// let scene = decodeURIComponent(e.query.scene);
			// scene = scene.split('&');
			// let data = {
			// 	//场景值
			// 	scene: e.scene
			// };
			// scene.forEach(item => {
			// 	let arr = item.split('=');
			// 	if (arr.length == 2) {
			// 		data[arr[0]] = arr[1];
			// 	}
			// });
			
			// store.commit('setChatScenesInfo', Object.assign(e.query, data));
			
			
			if(e.query){
				if(e.query.q){
					let q = decodeURIComponent(e.query.q);
					let zid = tools.getQueryString(q, 's');
					let gid = tools.getQueryString(q, 'g');
					if (zid>0){
						// e.query = {
						// 	content_id:zid
						// }
						// console.log('e.query',e.query)
						//tools.routerTo('/pages/componentsC/zhuan/publish_sell_view', {content_id:zid}, true);
						let data = {content_id:zid}
						let path='/pages/componentsC/zhuan/publish_sell_view?query='+encodeURIComponent(JSON.stringify(data))
						uni.reLaunch({
							url: path
						})
					}
					if (gid>0){
						let shopid = tools.getQueryString(q, 'shop_id');
						//tools.routerTo('/pages/componentsC/shop/index', {shop_id:shopid,goods_id:gid}, true);
						let data = {shop_id:shopid,goods_id:gid}
						let path='/pages/componentsC/shop/index?query='+encodeURIComponent(JSON.stringify(data))
						uni.reLaunch({
							url: path
						})
					}
				}
			}
		},
		onHide: function() {
			console.log('App Hide')
		},

	}
</script>




<style lang="scss">
	
	@import "@/uni_modules/uview-ui/index.scss";
	@import "@/uni_modules/uview-ui/libs/css/flex.scss";
	@import "static/font/custom-icon.css";
    /* 注意要写在第一行，同时给style标签加入lang="scss"属性 */
	//@import "common/demo.scss";

	page,uni-page-body {
		background: $u-bg-color;
		color: $u-content-color;
		width: 100vw;
		// height: calc(100% - var(--status-bar-height));
		height: 100vh;
		//display: flex;
		//flex-direction: column;
		//box-sizing: border-box;
		font-size: 28rpx;
		//flex-direction: row;
		//flex-wrap: wrap;
		//align-items: center;
			image {
				display: block;
			}
		}
		::v-deep .uni-toast .uni-toast__content{
			text-align: center!important;
		}
	
		view {
			box-sizing: border-box;
		}
	
		uni-page-body {
			width: 100vw;
			height: 100vh;
		}
	
		a {
			box-sizing: border-box;
		}
	
		image {
			display: block;
		}
	
		img {
			display: block;
		}
	
		p {
			font-size: 13px;
			line-height: 50rpx;
			text-align: justify;
		}
		.u-radio{
			margin: 3px 0px 10px 0px;
		}
	
	.price{
		color:$u-error;
		&::before{
		    content: '积分';//¥ $
		    margin-right: 1px;
		}
	}
	.price_del{
		text-decoration:line-through;
		&::before{
		    content: '';
		    margin-right: 1px;
		}
	}
	.font-weight-bold {
		font-weight: 700 !important;
	}
	.float_right{float: right; display: inline-block;}
	.flexbottom{
		position:fixed;bottom: 0rpx; width: 100%;
		background: $u-bg-color;
		padding-bottom: 70rpx;
		border-top: 0px solid $u-border-color;
		text-align: center;
		z-index: 1;
	}
	.base-tonglan-box{
         .htitle_s2{
		 min-height: 80rpx;
		 line-height: 80rpx;
		 padding: 0rpx 10rpx;
		 border-bottom:1px solid $u-border-color-light;
		 }
         .htitle{
		 min-height: 80rpx;
		 line-height: 80rpx;
		 padding: 0rpx 20rpx;
		 background: $u-cell-hover;
		 font-weight: bold; font-style: normal;
		 border-bottom:1px solid $u-border-color-light;
		 font-size: 30rpx;
		 i{
			 display: inline-block;
			 width: 50rpx;height: 50rpx;line-height: 50rpx;
			 text-align: center;
			 margin: 20rpx 20rpx 20rpx 0rpx;
			 border-radius: 100%;
			 background:$u-cell-bg;
			 border: solid 1px $u-border-color-light;
			 .u-icon{
				 color: $u-primary;
				 
			 }
		 }
		 }
		.item_single{
			position: relative;
			box-sizing: border-box;
		}
		.item{
			line-height: 160%;
			color: $u-content-color;
			position: relative;
			box-sizing: border-box;
			padding: 10rpx 10rpx;
			&:after {
				position: absolute;
				z-index: 0;
				right: 0;
				bottom: 0;
				left: 0;
				height: 0.5px;
				content: '';
				-webkit-transform: scaleY(.5);
				-ms-transform: scaleY(.5);
				transform: scaleY(.5);
				background-color: $u-border-color;
			}
			&:last-child {
				&:after{
					border-bottom: 0px;
					background-color:#FFFFFF;
					height: 0.1rpx;
				}
			}
		}
	}
	
		.htitle{ 
		 font-weight: bold; font-style: normal;
		 font-size: 30rpx;
		 min-height: 80rpx;
		 line-height: 80rpx;
		 color: $u-content-color;
		 i{
			 display: inline-block;
			 width: 50rpx;height: 50rpx;line-height: 50rpx;
			 text-align: center;
			 margin: 10rpx 10rpx 10rpx 0rpx;
			 border-radius: 100%;
			 background:#E4BB7B;
			 border: solid 1px #E4BB7B;
			 .u-icon{
				 color: #FFFFFF;
				 
			 }
		 }
		 .right{
			 
		 }
		 }
		 
	.base-panel-box{
		position: relative;
		border-radius: 18rpx;
		padding: 0rpx;
		border: 1px solid $u-border-color-light;
         .htitle_s2{
		 min-height: 80rpx;
		 line-height: 80rpx;
		 padding: 0rpx 20rpx;
		 }
		.htitle{ 
		 background: $u-cell-hover;
		 font-weight: bold; font-style: normal;
		 border-bottom:1px solid $u-border-color-light;
		 border-radius: 14rpx 14rpx 0rpx 0rpx;
		 font-size: 30rpx;
		 min-height: 80rpx;
		 line-height: 80rpx;
		 color: $u-content-color;
		 padding: 0rpx 20rpx;
		 i{
			 display: inline-block;
			 width: 50rpx;height: 50rpx;line-height: 50rpx;
			 text-align: center;
			 margin: 10rpx 10rpx 10rpx 0rpx;
			 border-radius: 100%;
			 background:$u-cell-bg;
			 border: solid 1px $u-border-color-light;
			 .u-icon{
				 color: $u-primary;
				 
			 }
		 }
		 .u-tag{padding: 4rpx 20rpx;background: #5338DD;}
		}
		.right{
			 float: right;line-height: 80rpx;height: 80rpx;margin-right: 20rpx;font-size: 20rpx;
		 }
		.item_single{
			padding: 18rpx 20rpx;
		}
		.item{
			/*border-left: solid 1px #EAECF7;
			border-right: solid 1px #EAECF7;*/
			background:$u-cell-bg;//$u-cell-bg
			color: $u-content-color;
			position: relative;
			box-sizing: border-box;
			padding: 18rpx 20rpx;
			&.yuan{
				border-radius:24rpx 24rpx 0rpx 0rpx ;
			}
		}
		.item:after {
		  position: absolute;
		  /* #ifndef APP-NVUE */
		  box-sizing: border-box;
		  content: " ";
		  pointer-events: none;
		  border-bottom: 0.4rpx solid $u-border-color-light;
		  /* #endif */
		  right: 0;
		  left: 0;
		  bottom: 0px;
		}
		.item:last-child {
			border-radius: 0rpx 0rpx 14rpx 14rpx;
			&:after{
				border-bottom:0px;
			}
		}
	}
	
	.u-load-more-wrap,.u-more{
		padding: 50rpx;
	}

	.b-b {
		position: relative;
	}

	.b-b::after {
		position: absolute;
		z-index: 0;
		right: 0;
		bottom: 0;
		left: 0;
		height: 0.5px;
		content: '';
		-webkit-transform: scaleY(.5);
		-ms-transform: scaleY(.5);
		transform: scaleY(.5);
		background-color: $u-border-color;
	}


     .mytoptonglan{
		font-weight: bold; font-style: normal;
		background: linear-gradient(96.25deg, #9849F1 20.55%, #E517F9 78.85%);
		color: #FFFFFF;
		line-height: 180%;
		.bg{
			background:url('https://i.yodin.com/storage/app/topbg.png') no-repeat bottom right;
			background-size: 50% 90%;
			padding: 50rpx 0rpx 60rpx 0rpx;
		}
		.bigtitle{
			font-size: 40rpx;
		}
	 }
	 .mybasebox{
		 background: #ffffff;
		 padding-top: 10rpx;
		 border-radius: 20rpx 20rpx 0rpx 0rpx;
		 margin-top: -20px;
	 }
	 .piaofu{
		 position: absolute;
		 top:250rpx;
		 left:48%;
	 }
    #editor {
        width: 100%;
		line-height: 130%;
        background-color: #EEEEEE;
		padding: 10rpx;
		border-radius: 10rpx;
		overflow: hidden;
    }
	
.page-wrap {
	.page-header {
		padding: 30rpx 40rpx;
		margin-bottom: 0rpx;
		.page-title {
			text-align: left;
			font-size: 40rpx;
			font-weight: 600;
			margin-bottom: 10rpx;
			color: $u-main-color;
		}

		.page-desc {
			color: $u-tips-color;
		}
	}
	
	.page-body {
		padding: 0rpx;
	}
}


ul,li{list-style:none;}
.u-font-xs {font-size: 26rpx;}
.u-font-sm {font-size: 30rpx;}
.u-font-md {font-size: 32rpx;}
.u-font-lg {font-size: 34rpx;}
.u-font-xl {font-size: 36rpx;}
.u-font-weight-bold{font-weight: bold;}

// 定义flex等分
@for $i from 0 through 12 {
	.u-flex-#{$i} {
		flex: $i;
	}
}

// 定义字体(px)单位，小于20都为px单位字体
@for $i from 9 to 20 {
	.u-font-#{$i} {
		font-size: $i + px;
	}
}

// 定义字体(rpx)单位，大于或等于20的都为rpx单位字体
@for $i from 20 through 40 {
	.u-font-#{$i} {
		font-size: $i + rpx;
	}
}

// 定义内外边距，历遍1-80
@for $i from 0 through 80 {
	// 只要双数和能被5除尽的数
	@if $i % 2 == 0 or $i % 5 == 0 {
		// 得出：u-margin-30或者u-m-30
		.u-margin-#{$i}, .u-m-#{$i} {
			margin: $i + rpx!important;
		}
		
		// 得出：u-padding-30或者u-p-30
		.u-padding-#{$i}, .u-p-#{$i} {
			padding: $i + rpx!important;
		}
		
		@each $short, $long in l left, t top, r right, b bottom {
			// 缩写版，结果如： u-m-l-30
			// 定义外边距
			.u-m-#{$short}-#{$i} {
				margin-#{$long}: $i + rpx!important;
			}
			
			// 定义内边距
			.u-p-#{$short}-#{$i} {
				padding-#{$long}: $i + rpx!important;
			}
			
			// 完整版，结果如：u-margin-left-30
			// 定义外边距
			.u-margin-#{$long}-#{$i} {
				margin-#{$long}: $i + rpx!important;
			}
			
			// 定义内边距
			.u-padding-#{$long}-#{$i} {
				padding-#{$long}: $i + rpx!important;
			}
		}
	}
}



</style>